<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link href="${pageContext.request.contextPath }/h-ui/css/H-ui.min.css"
	rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/h-ui/css/H-ui.admin.css"
	rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/h-ui/lib/Hui-iconfont/1.0.6/iconfont.css" rel="stylesheet" type="text/css" />
<%-- <link href="${pageContext.request.contextPath }/h-ui/set_dataTableAndBootstrap/tableAddData.css" rel="stylesheet" type="text/css" /> --%>
<title>面料管理</title>
</head>
<body>
	<nav class="breadcrumb"> <a
		class="btn btn-success radius r mr-20"
		style="line-height: 1.6em; margin-top: 3px"
		href="javascript:location.replace(location.href);" title="刷新"><i
		class="Hui-iconfont">&#xe68f;</i></a> </nav>
	<div class="pd-20">
		<div id="search" class="text-c1">
			<label>编号名称:</label><input type="text" class="input-text"
				style="width: 250px" placeholder="输入编号名称" id="P_NO" name="P_NO"
				value=""> <label>花型类别:</label> <span class="select-box"
				style="width: 150px;"> <select id="P_CATEGORY"
				name="P_CATEGORY" class="select">
					<option value="">请选择</option>
					<c:forEach items="${parent }" var="p">
						<option value="${p.ptId }">${p.ptName }</option>
					</c:forEach>
			</select>
			</span> <label>销售:</label> <span class="select-box" style="width: 150px;">
				<select id="P_VIP" name="P_VIP" class="select">
					<option value="">请选择</option>
					<option value="01">共享区</option>
					<option value="02">VIP专区</option>
					<option value="03">新上传</option>
					<option value="04">已下架</option>
			</select>
			</span>
			<button type="submit" class="btn btn-success radius" name=""
				onclick="searchMethod('#Patterns')">
				<i class="Hui-iconfont">&#xe665;</i> 搜索
			</button>
		</div>
		<div class="cl pd-5 bg-1 bk-gray mt-20">
			<span class="l"> 
				<a href="javascript:;" onclick="member_add('上传花型图片','../Patterns/insertImage','','510')" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe642;</i> 上传</a>
				<a href="javascript:;" onclick="member_edit_batch('管理','../Patterns/EditFilter','','510')"	class="btn btn-primary radius"><i class="Hui-iconfont">&#xe63c;</i> 管理</a>
				<a href="javascript:;" onclick="member_edit('管理预设标签','../Patterns/EditFilter2','','510')"	class="btn btn-primary radius"><i class="Hui-iconfont">&#xe63c;</i> 管理预设标签</a>
				<a href="javascript:;" onclick="member_edit_batch('销售','../Patterns/EditVip','','510')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe6df;</i> 销售</a> 
				<a href="javascript:;" onclick="member_edit('添加编号','../Patterns/EditNoAndCC','','510')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe604;</i> 添加编号</a>
				<a href="javascript:;" onclick="member_del('../Patterns/Deletes')" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 删除</a>
				<!-- <a href="javascript:;" onclick="createThumbnail('../Patterns/thumbnail')" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i>批量生成缩略图</a> -->
			</span>
		</div>
		<div class="mt-20">
			<table id="Patterns"
				class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">
						<th width="25"><input type="checkbox" name="" value=""></th>
						<th data-field="P_ID">ID</th>
						<th data-field="P_IMG" data-formatter="formatImg">花型图片</th>
						<th data-field="P_NO">编号名称</th>
						<th data-field="CHICUN">尺寸</th>
						<th data-field="P_COLOR">颜色</th>
						<th data-field="P_ELEMENT">元素</th>
						<th data-field="P_CATEGORY">类别</th>
						<th data-field="P_LOCATION">花位</th>
						<th data-field="P_VIP">销售区</th>
						<th data-field="P_BUYOUT_STATE" data-formatter="maiduan">是否买断</th>
						<th data-field="P_BUYOUT_PRICE">买断价格</th>
<!-- 						<th data-field="TIAOJIAN">条件</th> -->
						<!-- <th data-field="P_CREATE_TIME" data-formatter="dateFormatter">创建时间</th> -->
					</tr>
				</thead>
			</table>
		</div>
	</div>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/layer/2.1/layer.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/laypage/1.2/laypage.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/moment.min.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/js/H-ui.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/js/H-ui.admin.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/Validform/5.3.2/Validform.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/h-ui/tableAddData.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/jqthumb/jqthumb.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/tableBtnGroup.js"></script>	
	<script type="text/javascript">
		function formatImg(obj){	
		return '<img style="width: 80px;height: 120px;" alt="" src="${imgpath }'+obj+'">';
		}
		function maiduan(obj){	
			if(obj==1)
		return  "是";
			return "否";
		}
		
		/**
		* 批量生成缩略图
		*/
		function createThumbnail(dataUrlSS){
			alert(dataUrlSS);
			var index1 = layer.load(1);
			$.ajax({
				async:false,
				url:dataUrlSS,
				type:'post',
				success:function(result){
					var status=result.msg.status;
					if(status==0){
						layer.msg(desc,{icon:1,time:1000},function(){
							layer.close(index1);
						});
					}
				}
			});
			
		}
	
	</script>	
</body>
</html>